package com.haoze.nurseapp.dao;

import com.haoze.common.mapper.MyMapper;
import com.haoze.nurseapp.dto.OrderTypeDTO;
import com.haoze.nurseapp.dto.PatientTemperatureConfigDTO;
import com.haoze.nurseapp.dto.PatientTemperatureDTO;
import com.haoze.nurseapp.model.PatientTemperatureEntity;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface PatientTemperatureMapper extends MyMapper<PatientTemperatureEntity> {

    List<PatientTemperatureConfigDTO> selectConfig(@Param("wardDeptId") String wardDeptId, @Param("flag") String flag);

    List<Map<String, String>> selectConfigDict();

    List<OrderTypeDTO> getDrugDicts(@Param("keyword") String keyword);

    Map<String, String> selecPatient(@Param("inpatNum") String inpatNum);

    List<Map<String, String>> selecRecord(@Param("inpatNum") String inpatNum, @Param("date") String date);

    String selecRecordId(@Param("inpatNum") String inpatNum, @Param("date") String date);

    List<Map<String, String>> selectVolume(@Param("inpatNum") String inpatNum);

    List<PatientTemperatureDTO> queryTimeData(@Param("inpatNum") String inpatNum, @Param("date") String date);

    int saveOrUpdateStat(@Param("deptId")String deptId, @Param("dataCode")String dataCode);

    List<PatientTemperatureDTO> queryTimeDataByDay(@Param("inpatNum") String inpatNum, @Param("date") String day);

    List<PatientTemperatureDTO> queryTempTimeData(@Param("inpatNum") String inpatNum, @Param("date") String date);

    int deleteGuoMingYaoWu(@Param("inpatNum")String inpatNum, @Param("date") String date);

    String queryNurseStatistics(@Param("inpatNum")String inpatNum,@Param("date") String date,@Param("type")String type);

    int saveInAndOut(@Param("inpatNum")String inpatNum,@Param("day") String day,@Param("in") String in,@Param("out") String out);

    int saveOrUpdate(PatientTemperatureEntity item);

    String queryisHasC(@Param("inpatNum")String inpatNum,@Param("day") String day);

    int saveUrineVolume(@Param("inpatNum")String inpatNum,@Param("day") String day,@Param("urineStr") String urineStr);

    /**
     * 查询分娩时间和回室时间
     * @param inpatNum 住院号
     * @return map 键 deliveryTime  backRoomTime
     */
    Map<String, Date> selectDeliveryAndBackRoomTimeByInpatNum(String inpatNum);

    int updateDeliveryInputByInpatNum(@Param("inpatNum")String inpatNum, @Param("deliveryTime") Date deliveryTime, @Param("backRoomTime") Date backRoomTime);
}



